Conversation
Signed-off-by: anil <epipav@gmail.com>
|
|
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
Pull request overview
This PR addresses an import-time failure related to loguru usage in the git integration service utilities.
Changes:
- Removed the direct
import logurufromcrowdgit.services.utils. - Adjusted
run_shell_command()’sstderr_loggerparameter to avoid referencinglogurutypes at runtime.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| stderr_logger=None, | ||
| stderr_log_level: str = "INFO", |
There was a problem hiding this comment.
stderr_logger lost its type annotation to avoid importing loguru, which fixes the runtime import issue but removes typing from an otherwise well-typed API. Suggest keeping typing without a runtime dependency by using from __future__ import annotations plus a TYPE_CHECKING import, or by defining a small Protocol/type alias for the expected logger interface (e.g., an object with .log(level: str, message: str)), and update the docstring to match the actual .log(...) usage (it currently mentions .info()).
Signed-off-by: anil <epipav@gmail.com> Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Note
Low Risk
Low risk: this only removes an unused
loguruimport and relaxes thestderr_loggertype annotation, without changing command execution behavior.Overview
Fixes a runtime/import issue by removing the
logurudependency fromservices/utils.pyand changingrun_shell_command’sstderr_loggerparameter from aloguru.Loggertype to an untyped optional logger object.Written by Cursor Bugbot for commit c089e45. This will update automatically on new commits. Configure here.